package com.hospital.registration.web;


import com.hospital.registration.entity.Subject;
import com.hospital.registration.service.ISubjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.xml.transform.Result;
import java.util.List;

/**
 * <p>
 * 科室表 前端控制器
 * </p>
 *
 * @author 史永康
 * @since 2020-10-22
 */
@RestController
@RequestMapping("/subject")
public class SubjectController {

    @Autowired
    ISubjectService iSubjectService;

    @RequestMapping("/list")
    public List<Subject> findSubject(){
        List<Subject> list = iSubjectService.list();
        return list;
    }

}
